<template>
  <!-- 1.0 顶部通栏 -->
  <app-topnav></app-topnav>
  <!-- 2.0 头部 -->
  <app-header></app-header>
  <app-header-sticky></app-header-sticky>
  <!-- 3.0 主容器 -->
  <main class="app-body">
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <!-- 4.0 底部 -->
  <app-footer></app-footer>
</template>

<script>
import AppTopnav from '@/components/app-topnav.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import { useStore } from 'vuex'
import AppHeaderSticky from '@/components/app-header-sticky.vue'

export default {
  components: { AppTopnav, AppHeader, AppFooter, AppHeaderSticky },
  name: 'rabbit-layout',
  setup () {
    const store = useStore()
    store.dispatch('categoryStore/getAllCategory')
  }
}
</script>

<style scoped lang="less">
.app-body {
  min-height: 600px;
}
</style>
